import { Commit } from "vuex"

const state: any = {
    collapsed: false
}
const getters: any = {
    collapsed: (state: any) => state.collapsed
}
const mutations: any = {
    toggleCollapsed(state: any) {
        state.collapsed = !state.collapsed
    }
}
const actions: any = {
    toggleCollapsed(context: {commit: Commit}) {
        context.commit("toggleCollapsed")
        console.log("collapsed: ", state.collapsed)
    }
}

export default {state, getters, mutations, actions}